<?php
require('lib/verify.php');
require('lib/has_char.php');
require('lib/is_approved.php');
require('lib/is_admin.php');

$character_id = $_GET["id"];

$system_id = $system["system_id"];

$sql = "update wm_characters set character_approved='1' where character_id='$character_id'";
$result = $db->query($sql);

reprocessDKP($db, $system_id);

$ii = $db->insert_id($result);

$sql = "update subc_users LEFT JOIN wm_characters ON wm_characters.character_forum_id = subc_users.id set subc_users.group_id = 12 WHERE subc_users.group_id =4 and wm_characters.character_approved=1";
$result = $db->query($sql);

header("Location: admin.php");

?>

